/*
 * @author (C) <a href="http://www.carfield.com.hk">Carfield Yim</a>, 2004
 */
package hk.com.carfield.content;

import hk.com.carfield.core.Config;

import java.io.File;

public final class MediaPlayer extends PluginItem {
	public MediaPlayer(final Config config, final File file) {
		super(config, file);
	}
    public String pluginHtml(final String path) {
    	return "<SCRIPT>"+eol+
		"if (navigator.appName == \"Netscape\") {" +eol+
		"    document.writeln('<APPLET NAME=\"Player\" CODE=\"WMPNS.WMP\">');"+eol+
		"    document.writeln('  <PARAM NAME=\"URL\" VALUE=\""+path+"\"/>');" +eol+
		"    document.writeln('</APPLET>');" +eol+
		"} else {" +eol+
		"    document.writeln('<OBJECT ID=\"Player\" CLASSID=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\">');" +eol+
		"    document.writeln('  <PARAM name=\"URL\" VALUE=\""+path+"\"/>');" +eol+
		"    document.writeln('</OBJECT>');" +eol+
		"}" +eol+
		"</SCRIPT>" ;
    }
    
    //TODO see if we have a way to extra wma's metadata
}
